package roslan.musicbox.client.data;

import java.util.Vector;

public class TagCleanResult {
	public enum ResultType {NONE,UNIQUE,MULTIPLE};
	
	private MusicFile				music;
	private Vector<ClientMusicTag>	resultList;
	private ClientMusicTag			bestTag;
	private ResultType 				resultType;
	
	public MusicFile getMusic() {
		return music;
	}
	
	public void setMusic(MusicFile music) {
		this.music = music;
	}
	
	public Vector<ClientMusicTag> getResultList() {
		return resultList;
	}
	
	public int getResultNum(){
		if(resultList == null) return 0;
		return resultList.size();
	}
	
	public ClientMusicTag getResult(int index){
		if(resultList == null) return null;
		if(index < 0 || index >= resultList.size())
			return null;
		return resultList.elementAt(index);
	}
	
	public void setResultList(Vector<ClientMusicTag> resultList) {
		this.resultList = resultList;
	}
	
	public ClientMusicTag getBestTag() {
		return bestTag;
	}
	
	public void setBestTag(int index) {
		if(index < 0 || index >= resultList.size())
			return;
		this.bestTag = resultList.elementAt(index);
		resultType = ResultType.UNIQUE;
	}
	
	public ResultType getResultType() {
		return resultType;
	}
	
	public void setResultType(ResultType resultType) {
		this.resultType = resultType;
	}
	
}
